package com.bainc.web.shared;

import com.bainc.web.shared.types.ContactInfo;
import com.bainc.web.shared.types.Name;
import com.bainc.web.shared.types.UserTag;
import com.google.gwt.user.client.rpc.IsSerializable;

/*
 * Defines profile of a user. Profile is indexed by loginId.
 */
public class UserProfile implements IsSerializable {
	private String loginId = "";
	private Name name = null;
	private ContactInfo contactInfo = null;
	private UserTag[] tags = null;
	private UserProfile[] friends = null;
	
	public void setName(Name name) {
		this.name = name;
	}

	public Name getName() {
		return name;
	}

	public void setContactInfo(ContactInfo contactInfo) {
		this.contactInfo = contactInfo;
	}

	public ContactInfo getContactInfo() {
		return contactInfo;
	}

	public void setTags(UserTag[] tags) {
		this.tags = tags;
	}

	public UserTag[] getTags() {
		return tags;
	}

	public void setFriends(UserProfile[] friends) {
		this.friends = friends;
	}

	public UserProfile[] getFriends() {
		return friends;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getLoginId() {
		return loginId;
	}

	public String toString() {
		String summary = "loginId: " + loginId
				+ ", name: " + name
				+ ", contactInfo: " + contactInfo
				+ ", tags: " + tags
				+ ", friends: " + friends;
		return summary;
	}
}
